ci: use cargo-deny
authorColin Walters <walters@verbum.org>
Tue, 10 May 2022 21:13:44 +0000 (17:13 -0400)
committerColin Walters <walters@verbum.org>
Tue, 10 May 2022 21:14:01 +0000 (17:14 -0400)
Copied from https://github.com/ostreedev/ostree-rs-ext/pull/291

Part of unifying our CI.

.github/workflows/rust.yml
deny.toml [new file with mode: 0644]

index d047c8c7129bee28029b7fcc6d92f2a1b35cb528..dff0f5170e11f42e97ac3dd620a7e04d6b508f1e 100644 (file)
@@ -66,3 +66,11 @@ jobs:
         run: cargo fmt -p ostree -- --check -l
       - name: cargo clippy (warnings)
         run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} -- -D warnings
+  cargo-deny:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: EmbarkStudios/cargo-deny-action@v1
+      with:
+        log-level: warn
+        command: check bans sources licenses
diff --git a/deny.toml b/deny.toml
new file mode 100644 (file)
index 0000000..75b6ac9
--- /dev/null
+++ b/deny.toml
@@ -0,0 +1,10 @@
+[licenses]
+unlicensed = "deny"
+allow = ["Apache-2.0", "Apache-2.0 WITH LLVM-exception", "MIT", "BSD-3-Clause", "BSD-2-Clause"]
+
+[bans]
+
+[sources]
+unknown-registry = "deny"
+unknown-git = "deny"
+allow-git = []